#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;
    string s;
    cin >> s;
    vector<string> v;
    int pos = 0, cur = 0;
    while(pos < n) {
        cur = pos;
        while(cur < n-1 && s[cur] == s[cur+1]) {
            cur++;
        }
        if(cur-pos+1 < 3 || (((cur-pos+1) % 2) == 0)){ 
            cout << "-1";
            return 0;
        }else {
            v.emplace_back(s.substr(pos, cur-pos+1));
        }
        pos = cur+1;
    }
    for(int i = 0; i < v.size(); ++i) {
        cout << v[i] << " ";
    }
    return 0;
}